home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Info-Mac 4
/
Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso
/
Science
/
RLaB
/
help
/
find
< prev
next >
Wrap
Text File
|
1994-04-25
|
561b
|
26 lines
find:
Syntax: find ( A )
Description:
Find returns a matrix that contains the indices of the
non-zero elements of the input matrix A.
A common usage for find(), is the selection of matrix elements
that meet certain criteria.
Example:
> a = rand(4,4)
a =
matrix columns 1 thru 4
0.647 0.665 0.655 0.299
0.333 0.0847 0.129 0.265
0.0369 0.204 0.91 0.7
0.162 0.167 0.112 0.95
> x = a[ find( a < .1 ) ]
x =
matrix columns 1 thru 2
0.0369 0.0847